Conventionally, there is known a gas sensor for detecting the concentration of a specific gas component in an exhaust gas emitted from an internal combustion engine of an automobile or the like. A gas sensor element used in the gas sensor generally includes a solid electrolyte layer, and a reference electrode and a detection electrode that are provided on the surfaces of the solid electrolyte layer. A reference gas (e.g., air) is supplied to the reference electrode, and a gas to be measured is supplied to the detection electrode. As the gas sensor element, for example, there is known a stacked type gas sensor element that includes a stacked body in which, together with the above-described solid electrolyte layer including the pair of electrodes, an insulating layer, a heater, and the like are stacked, and that has a plate-like outer shape as a whole. As a structure in which a reference gas is supplied to the reference electrode in the stacked type gas sensor element, there is proposed a structure in which, in a layer adjacent to the reference electrode, a through-hole is provided so as to form a reference gas chamber that supplies a reference gas to the reference electrode and a through-hole is provided so as to form a communication path for guiding the reference gas from a side surface of the stacked type gas sensor element to the reference gas chamber (e.g., see Patent Document 1).